Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

feature/firmware/src/commonMain/kotlin/org/meshtastic/feature/firmware/FirmwareManifest.kt 2d20cd8a4708e2ef66e98d5259f3a97ec93f240a (2d20cd8a) Text, 2.71 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.feature.firmware

Tff7b72import T7ee787kotlinx.serialization.SerialName
Tff7b72import T7ee787kotlinx.serialization.Serializable

T8b949e/**
* Kotlin model for `.mt.json` firmware manifest files published alongside each firmware binary since v2.7.17.
*
* The manifest is per-target, per-version and describes every partition image for a given device. During ESP32 WiFi OTA
* we fetch the manifest on-demand, locate the `app0` partition entry, and use its [FirmwareManifestFile.name] as the
* exact filename to download.
*
* Only [files] is modelled. The manifest also carries decorative metadata (`hwModel`, `mcu`, `build_epoch`, the
* partition table, …) whose scalar types vary across firmware versions — notably `hwModel` is an **integer** in current
* releases (the `HardwareModel` enum value) though it was historically a string. Modelling those would couple parsing
* to a schema we don't control; instead [Json.ignoreUnknownKeys] drops them so an upstream type change can never break
* OTA resolution. (A `hwModel: String` field previously made every manifest fail to parse, silently falling back to
* filename heuristics — see `FirmwareRetriever`.)
*
* Example URL:
* ```
* https://raw.githubusercontent.com/meshtastic/meshtastic.github.io/master/
* firmware-2.7.17/firmware-t-deck-2.7.17.mt.json
* ```
*/
Tf0883e@Serializable Tff7b72internal Tff7b72data Tff7b72class T56d364FirmwareManifestTb4b4b4(Tff7b72val Te6edf3filesTb4b4b4: Te6edf3ListTff7b72<Te6edf3FirmwareManifestFileTff7b72> Tff7b72= Te6edf3emptyListTb4b4b4(Tb4b4b4)Tb4b4b4)

T8b949e/**
* A single partition file entry inside a [FirmwareManifest].
*
* @property name Filename of the binary (e.g. `firmware-t-deck-2.7.17.bin`).
* @property partName Partition role: `app0` (main firmware — the OTA target), `app1` (OTA loader), or `spiffs`
* (filesystem image).
* @property md5 MD5 hex digest of the binary content.
* @property bytes Size of the binary in bytes.
*/
Tf0883e@Serializable
Tff7b72internal Tff7b72data Tff7b72class T56d364FirmwareManifestFileTb4b4b4(
Tff7b72val Te6edf3nameTb4b4b4: Tffa657StringTb4b4b4,
Tf0883e@SerialNameTb4b4b4(Ta5d6ff"Ta5d6ffpart_nameTa5d6ff"Tb4b4b4) Tff7b72val Te6edf3partNameTb4b4b4: Tffa657String Tff7b72= Ta5d6ff"Ta5d6ff"Tb4b4b4,
Tff7b72val Te6edf3md5Tb4b4b4: Tffa657String Tff7b72= Ta5d6ff"Ta5d6ff"Tb4b4b4,
Tff7b72val Te6edf3bytesTb4b4b4: Tffa657Long Tff7b72= T79c0ff0LTb4b4b4,
Tb4b4b4)

Served by rngit 1.5.0 - Generated in 0.05s